<%@ page import="java.util.List" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/5/19
  Time: 11:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath();%>
<script src="<%=path%>/static/js/jquery-3.5.1.min.js"></script>
<link href="<%=path%>/static/web/css/my.css" rel="stylesheet" media="screen">
<style>
    .result-content table{
        text-align: center;
    }
    #hide{
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        position: fixed;
        background-image: url("<%=path%>/static/web/css/img/overlay.png");
        opacity: 1;
        z-index: 100;
        display: none;
    }
    #hide #mes{
        margin: 0;
        padding: 0;
        width: 30%;
        height: 30%;
        position: absolute;
        left: 30%;
        top: 15%;
        z-index: 120;
        border: #3a3a3a 8px solid;
        background-color: #cccccc;
        overflow: auto;
    }
    #hide #mes #header{
        margin: 0;
        padding: 0;
        background-color:#019875;
        height: 50px;
        z-index: 150;
        color: white;
    }
    #hide #mes #header #but{
        position: relative;
        background-image: url("<%=path%>/static/web/css/img/controls.png");
        width: 30px;
        height: 30px;
        float: right;
        border:#019875 0px solid;
    }
    #hide #mes #header #but:hover{
        cursor: pointer;
    }
    #hide #mes #header #title{
        font-size: 25px;

    }
    #hide #mes div {
        text-align: center;
        margin-top: 10px;
        padding: 0;
        height: 50px;
        z-index: 150;
        color: #0C0C0C;
        font-size: 20px;
    }
    #hide #mes #ok{
        margin-top: 40px;
    }
    #hide #mes #ok input:hover{
        cursor: pointer;
        color: #019875;
    }
</style>
<style>
    #hideing{
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        position: fixed;
        background-image: url("<%=path%>/static/web/css/img/overlay.png");
        opacity: 1;
        z-index: 100;
        display: none;
    }
    #hideing #mesg{
        margin: 0;
        padding: 0;
        width: 30%;
        height: 30%;
        position: absolute;
        left: 30%;
        top: 15%;
        z-index: 120;
        border: #3a3a3a 8px solid;
        background-color: #cccccc;
        overflow: auto;
    }
    #hideing #mesg #headers{
        margin: 0;
        padding: 0;
        background-color:#019875;
        height: 50px;
        z-index: 150;
        color: white;
    }
    #hideing #mesg #headers #butt{
        position: relative;
        background-image: url("<%=path%>/static/web/css/img/controls.png");
        width: 30px;
        height: 30px;
        float: right;
        border:#019875 0px solid;
    }
    #hideing #mesg #headers #butt:hover{
        cursor: pointer;
    }
    #hideing #mesg #headers #sub{
        font-size: 25px;

    }
    #hideing #mesg div {
        text-align: center;
        margin-top: 10px;
        padding: 0;
        height: 50px;
        z-index: 150;
        color: #0C0C0C;
        font-size: 20px;
    }
    #hideing #mesg #oks{
        margin-top: 40px;
    }
    #hideing #mesg #oks input:hover{
        cursor: pointer;
        color: #019875;
    }
</style>
<style>
    .result-content img{
        width: 50px;
        height: 50px;
    }
    .result-content table{
        text-align: center;
    }
</style>
<script>
    $(function () {
        var pageNum = 1;
        initdate(pageNum);
        //点击页码
        $(".result-content").on("click",".list-page a",function () {
            var pageNum = $(this).data("pagenum");
            initdate(pageNum);
        });
    });
    //初始化数据
    function initdate(pageNum) {
        $.ajax({
            url:"<%=path%>/manage/stage/listdata",
            type:"get",
            data:{pagernum:pageNum},
            success:function (resource) {
                $(".result-content").html(resource);
            }
        });
    }




</script>
<script>
    $(function () {
        $("#insert").click(function () {
            $("#hide").css("display","block");
        });
    });
    $(function () {
        $("#but").click(function () {
            $("#hide").css("display","none");
        });
    });
    $(function () {
        $("#button").click(function () {
            var title = $("#setUp").val();
            if (title==""){
                return;
            }
            $.post("<%=path%>/manage/stage/insert",{title:title},function () {
                $("#hide").css("display","none");
                if (data=="ok"){
                    location.reload();
                }
            });
        });
    });
    $(function () {
        $(".allChoose").click(function () {
            $(":checkbox[id='choose']").prop("checked",$(this).prop("checked"));
        });

    });
    $(function () {
        batchDel();
    });
    function batchDel() {
        $("#batchDel").click(function () {
            var idArr = new Array();
            $(":checked[id='choose']").each(function () {
                idArr.push($(this).val());
            });
            if (idArr.length>0){
                $.get("<%=path%>/manage/degree/batchDel",{idArr:idArr.toString()},function () {
                    for (var i=0;i<idArr.length;i++){
                        if ($(":checked[id='choose']").val()==idArr[i]){
                            $(":checked[id='choose']").parent().parent().remove();
                        }
                    }
                });
            }
        });
    }
    $(function () {
        var id = "";
        $(".link-update").click(function () {
            var name = $(this).parent().prev().prev().html();
            $("#setResume").val(name);
            id = $(this).attr("id");
            $("#hideing").css("display","block");
        });
        $("#butt").click(function () {
            $("#hideing").css("display","none");
        });
        $("#buttons").click(function () {
            var title = $("#setResume").val();
            if (title==""){
                return;
            }
            $.get("<%=path%>/manage/nations/update",{title:title,id:id},function () {
                $("#hideing").css("display","none");
                location.reload();
            });
        });
    });
</script>
<div id="hide">
    <div id="mes">
        <div id="header">
            <span id="title">添加规模</span>
            <button id="but"></button>
        </div>
        <div id="like">
            <span>名称:&nbsp;</span>
            <input type="text" id="setUp">
        </div>
        <div id="ok">
            <span style="margin-left: 10px">
                <input type="button" id="button" style="font-size: 20px" value="添加">
            </span>
        </div>
    </div>
</div>
<div id="hideing"></div>
<jsp:include page="/manage/inc/header"/>
<jsp:include page="/manage/inc/menu"/>
<!--/sidebar-->
<div class="main-wrap">

    <div class="crumb-wrap">
        <div class="crumb-list"><i class="icon-font"></i><a href="<%=path%>/manage/index">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">用户管理</span></div>
    </div>
    <div class="search-wrap">
        <div class="search-content">
            <table class="search-tab">

                <tr>
                </tr>
            </table>
        </div>
    </div>
    <div class="result-wrap">

        <div class="result-title">
            <div class="result-list">
                <%--<a href="insert.html"><i class="icon-font"></i>新增作品</a>--%>
                <a href="#" id="insert"><i class="icon-font"></i>新增规模</a>
                <%--<a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i>更新排序</a>--%>
            </div>
        </div>
        <div class="result-content">

        </div>
    </div>
</div>
<!--/main-->
</div>
<jsp:include page="/manage/inc/footer"/>